package com.parking.order.model.form;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * 平台查询订单日志Form
 * */
@Data
@ApiModel("平台查询订单日志Form")
public class FindOrderLogsPlatformForm {
    /**
     * 页数
     * */
    @ApiModelProperty("页数")
    @NotNull(message = "pageNum不为空")
    @Min(message = "pageNum为正数",value = 1)
    private Integer pageNum;
    /**
     * 每页大小
     * */
    @ApiModelProperty("每页大小")
    @NotNull(message = "pageSize不为空")
    @Min(message = "pageSize为正数",value = 1)
    private Integer pageSize;
    /**
     * 开始时间
     * */
    @ApiModelProperty("开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;
    /**
     * 结束时间
     */
    @ApiModelProperty("结束时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;
    /**
     * 订单编号
     * */
    @ApiModelProperty("订单编号")
    @Length(message = "orderInfoNum长度为19",min = 19,max = 19)
    private String orderInfoNum;
    /**
     * 日志人类型 0系统自动 1用户 2物业
     * */
    @Min(message = "logsPersonType不存在",value = 0)
    @Max(message = "logsPersonType不存在",value = 2)
    @ApiModelProperty("日志人类型")
    private Integer logsPersonType;
    /**
     * 操作人
     */
    @ApiModelProperty("日志人")
    private String logsUpdatePerson;
}
